﻿CREATE TABLE [dbo].[t_CarInfo] (
    [LoanID]                 INT            NOT NULL,
    [VIN]                    VARCHAR (18)   NULL,
    [Mileage]                INT            NULL,
    [Used]                   BIT            NOT NULL,
    [BookValueOverride]      INT            NULL,
    [BookValueDescOverride]  VARCHAR (128)  NULL,
    [ManheimValue]           INT            NULL,
    [Color]                  VARCHAR (50)   NULL,
    [Tag]                    VARCHAR (50)   NULL,
    [Description]            NVARCHAR (128) NULL,
    [Price]                  NUMERIC (9, 2) NULL,
    [MarketValue]            INT            NULL,
    [IsSUV]                  BIT            NOT NULL,
    [VIN_L9]                 AS             (left([VIN],(9))) PERSISTED,
    [VIN_8R]                 AS             (right([VIN],(8))) PERSISTED,
    [VIN_L8]                 AS             (left([VIN],(8))) PERSISTED,
    [BookValueCurrent]       INT            NULL,
    [BookValueCurrentTypeID] INT            NOT NULL,
    [BookValueCurrentDate]   SMALLDATETIME  NULL,
    [BookValueProviderCode]  VARCHAR (1)    NOT NULL
);

